home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4445 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: question
  5. Date: Sun, 04 Feb 1996 17:58:49 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4f2s88$b6u@fountain.mindlink.net>
  8. References: <4f2o7j$l62@news2.widomaker.com>
  9. NNTP-Posting-Host: line200.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. sgross@widomaker.com (Stephen Gross) wrote:
  13.  
  14. >Can anybody explain in depth the process of the following code:
  15. >    assuming (char *q, char *z)
  16.  
  17. >->    q = &z;      <-
  18.  
  19. >    I know of course that this assign the address of z to q, BUT:
  20. >    I have written code wherein the variable q is completely 
  21. >unnecessary (i put it in as a watch variable), but the program functions 
  22. >correctly with it, and bombs out without it. This is theoretically 
  23. >impossible because q does nothing more than hold z's address. NOTHING more. 
  24. >any ideas on what's going on? i'm using borland c 3.1.
  25.  
  26. >thanx, sgross
  27.  
  28.      Please post code.
  29.  
  30.      As it stands, you might have a compiler error or even worse: a
  31. typo.  We aren't mindreaders.  Well, actually, I am, but I'm not that
  32. good.
  33.  
  34. Sincerely,
  35.  
  36. Gene Wirchenko
  37.  
  38. C Pronunciation Guide:
  39.      y=x++;     "wye equals ex plus plus semicolon"
  40.      x=x++;     "ex equals ex doublecross semicolon"
  41.  
  42.